/*
 * @Author: guxf
 * @Date: 2021-11-25 12:47:22
 * @Description: 用户相关接口
 */
import request from '@/utils/request'
const api = {
  deleteById: '/file/',
  deleteByFilePath: '/file/deleteFile',
  upload: '/file/uploadImg',
	getImg:'/file/getLoadImg'
}
export function deleteById(filePath) {
  let url = api.deleteById + filePath
  return request({
    method: "delete",
    url: url,
  });
}
export function deleteByFilePath(filePath) {
  let url = api.deleteById + filePath
  return request({
    method: "delete",
    url: api.deleteByFilePath,
    params: filePath
  });
}
export function upload(parameter) {
  return request({
    method: "POST",
    url: api.upload,
    data: parameter,
  });
}
export function getImg(path) {
  let param={filePath:path}
  return request({
    method: "GET",
    url: api.getImg,
    data: param,
		responseType:'arraybuffer' ,
  });
}
